package com.yywz.io;

import java.io.File;
import java.io.FilenameFilter;

public class DirList {

	public static void main(String[] args) {
		File filePath = new File(".");
		String[] list = filePath.list(new DirFilter());
		for (String name : list) {
			System.out.println(name);
		}
	}

}

class DirFilter implements FilenameFilter {
	
	@Override
	public boolean accept(File dir, String name) {
		if ("config.ini".equals(name)){
			return true;
		} else {
			return false;
		}
	}
	
}